Skip to content

Dynamic PINE implementation#103

Open
jacobmix wants to merge 13 commits intoevilwb:mainfrom
jacobmix:DynamicPinePR
Open

Dynamic PINE implementation#103
jacobmix wants to merge 13 commits intoevilwb:mainfrom
jacobmix:DynamicPinePR

Conversation

@jacobmix
Copy link

@jacobmix jacobmix commented Nov 8, 2025

This is a way for having dynamic PINE port set for each instance of the client/PCSX2
Allowing you to run multiple instances at the same time & play without issues.
Currently it adds a /start command to manually launch from within the client.
There's some checks and non-halting errors for if you're missing host.yaml settings
Would like to improve it more, but honestly my knowledge of AP coding is quite limited so here's what i have so far.

Myself, and a few other people have tested it fine without issue.
Only problems we've noticed if you start instances too quickly PINE can become desynced.
If you don't have an iso set and run /start it will give an error, and not prompt for .aprac2. Running command again works tho.
Also tried warning the user to not close client while moving iso. But couldn't get it working smoothly so has been removed.

Let me know if any changes are needed. Currently include a lot of comments for sections i've changed.
Gonna include what i had in my release notes here:

Release notes

Testing Dynamic PINE ports for multi PCSX2 instance support.
Based on: https://github.com/evilwb/APRac2/releases/tag/v0.6.4

Setup

You need every RaC2 option in your host.yaml setup. That means:
iso_file to a valid vanilla iso in your Archipelago directory (should be already from normal setup)
iso_start to your PCSX2 exe (Make sure to use /)
game_ini to a game settings file in your PCSX2's gamesettings folder.
(Usually %USERPROFILE%/Documents/PCSX2/gamesettings/SCUS-97268_38996035.ini)

Example:

rac2_options:
  # File name of the Ratchet & Clank 2 ISO
  iso_file: "Ratchet & Clank - Going Commando (USA) (v1.01).iso"
  # Set this false to never autostart an iso (such as after patching),
  # Set it to true to have the operating system default program open the iso
  # Alternatively, set it to a path to a program to open the .iso file with (like PCSX2)
  iso_start: "C:/Emulators/(PS2) PCSX2/pcsx2-qt.exe"
  # Set to file path to an existing PCSX2 game setting INI file to have the patcher
  # create an appropriately named INI with the rest of the patch output. This can be used to
  # allow you to use you own custom PCSX2 setting with patched ISO.
  game_ini: "%USERPROFILE%/Documents/PCSX2/gamesettings/SCUS-97268_38996035.ini"

Game settings ini example:

[EmuCore]
EnablePINE = true
PINESlot = 28011

[Achievements]
Enabled = false

[MemoryCards]
Slot1_Enable = true
Slot2_Enable = false
Slot1_Filename = APgames.ps2

Recommended you use your settings for vanilla RaC2. But you can make a copy with specific edits.
So you can set an AP specific memory card like in the example above. (You don't need to add PINE settings)

For normal setup if you haven't already. Check GitHub, and Discord.

Start

Simply run a .aprac2 file with Archipelago. (Recommended to set to open .aprac2 files with Archipelago by default)
Or run the client, and use the /start command, and then select your desired .aprac2 file.
Note: You can rename aprac2 and patched iso but they have to have the same name or it'll make another iso.
(Same way you have to keep .apsave, and their .zip name the same if hosting locally)

Full changes: jacobmix/APRac2@main...v0.6.5-PINE-pre

Create game ini if path is valid but file missing.
Add game ini options if missing.
Change copied game ini instead of one selected in host.yaml
Also changed "PINESlot" to "pineslot".
Capitalized game ini settings:
[EmuCore]
EnablePINE = true
PINESlot = 28011

[Achievements]
Enabled = false
Make sure game settings ini works with or without capitalization.
Keep original ini untouched.
Added /start command to launch .aprac2
Included checks to make sure host.yaml has propper settings.
Now verify iso copy when creating vanilla iso in archipelago directory.
Should hopefully fix problems some users have.
Could still happen if people close mid copy or ignore errors. But client should warn against that.
Logging doesn't work.
Main issue is probably people closing the client anyway.
Could put a message in to tell people to not close the client.
But already get an error when trying to open the patch message after copying iso.
@jacobmix
Copy link
Author

jacobmix commented Feb 24, 2026

Also found out that patches actually store room data, and update with the room.
Not part of this PR but here's an example of making the client auto connect: 10799a7
Talked about it on Discord here: https://discord.com/channels/731205301247803413/1325015730218860554/1475645576094941226

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant